import { uploadBucket, uploadFile } from "@/apis/file"

export let uploadMode = "default"
export const uploadModeType = {
	"default":{
		tag:"default://",
		target:process.env.VUE_APP_REQUEST_URL,
		upload:uploadFile
	},
	// "bucket":{
	//     tag:"bucket://",
	//     target:"https://",
	//     name:"bucket-1305134676",
	//     upload:uploadBucket
	// }
}

export const addMode = (name,bucket)=>{
	bucket.upload = uploadBucket
	uploadModeType[name] = bucket
}

export const setActiveMode = (name)=>(uploadMode=name)